package org.uxy.plugin.gitclonehelper.ui

import com.intellij.openapi.application.ModalityState
import com.intellij.openapi.project.Project
import com.intellij.openapi.vcs.ui.cloneDialog.VcsCloneDialogExtension
import com.intellij.openapi.vcs.ui.cloneDialog.VcsCloneDialogExtensionComponent
import org.uxy.plugin.gitclonehelper.util.IconUtil
import java.util.ResourceBundle
import javax.swing.Icon

class GitCloneHelperDialog : VcsCloneDialogExtension{
    private val bundle: ResourceBundle = ResourceBundle.getBundle("messages.plugin")

    override fun getIcon(): Icon {
        return IconUtil.GIT_CLONE_HELPER
    }

    override fun getName(): String {
        return bundle.getString("git-clone-helper.name")
    }

    override fun getTooltip(): String? {
        return bundle.getString("git-clone-helper.tooltip")
    }

    override fun createMainComponent(project: Project, modalityState: ModalityState): VcsCloneDialogExtensionComponent {
        return GitCloneHelperComponent()
    }
}
